package com.atmilan.quartz.model.entity.buyer;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class JobProductStock extends Model<JobProductStock> {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @JsonProperty(value = "id")
    @TableId(value = "id",type = IdType.INPUT)
    private Integer id;
    
    /**
     * 商品id
     */
    @JsonProperty(value = "bar_code")
    private String barCode;
    
    /**
     * 库存id
     */
    @JsonProperty(value = "sku_id")
    private String skuId;
    
    /**
     * 库存
     */
    @JsonProperty(value = "stock")
    private Integer stock;
    
    /**
     * 版本
     */
    @JsonProperty(value = "version")
    private Integer version;
    
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd  HH:mm:ss")
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd  HH:mm:ss")
    private Date updateTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
